Socket
Socket
Sign inDemoInstall

del-cli

Package Overview
Dependencies
140
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    del-cli

Delete files and directories - Cross-platform


Version published
Weekly downloads
251K
decreased by-2.58%
Maintainers
1
Install size
1.41 MB
Created
Weekly downloads
 

Package description

What is del-cli?

The del-cli package is a command-line tool for deleting files and directories using glob patterns. It is a convenient wrapper around the 'del' module, making it easy to use from the command line.

What are del-cli's main functionalities?

Delete files

This feature allows you to delete a specific file by providing its path.

del-cli 'path/to/file.txt'

Delete directories

This feature allows you to delete an entire directory and its contents by providing the directory path.

del-cli 'path/to/directory'

Use glob patterns

This feature allows you to use glob patterns to delete multiple files that match the pattern. For example, this command deletes all .txt files in the specified directory.

del-cli 'path/to/files/*.txt'

Force delete

This feature allows you to forcefully delete files or directories that are normally protected. Use with caution.

del-cli 'path/to/file.txt' --force

Dry run

This feature allows you to perform a dry run, showing which files would be deleted without actually deleting them. This is useful for testing your glob patterns.

del-cli 'path/to/files/*.txt' --dry-run

Other packages similar to del-cli

Readme

Source

del-cli Build Status

Delete files and directories

Useful for use in build scripts and automated things.

Note that this does permanent deletion. See trash-cli for something safer.

Install

$ npm install --global del-cli

Usage

$ del --help

  Usage
    $ del <path|glob> …

  Options
    -f, --force    Allow deleting the current working directory and outside
    -d, --dry-run  List what would be deleted instead of deleting

  Examples
    $ del unicorn.png rainbow.png
    $ del '*.png' '!unicorn.png'

Since $ del is already a builtin command on Windows you need to use $ del-cli there.

  • del - API for this module
  • trash-cli - Move files and directories to the trash
  • make-dir-cli - Make directories and their parents if needed

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 27 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc